import Vue from 'vue'
import Router from 'vue-router'




Vue.use(Router)

//superAdmin
import adminIndex from '../pages/admin/Full.vue';
import adminLogin from '../pages/admin/Login.vue';
import adminArticleGroup from '../pages/admin/ArticleGroup.vue';
import adminArticle from '../pages/admin/Article.vue';
import adminArticleSections from '../pages/admin/ArticleSections.vue';
import adminOauthUrls from '../pages/admin/OauthUrls.vue';




export default new Router({
  routes: [

    //admin
    {path: '/admin/login', name: '登录', component: adminLogin},
    {path: '/admin/index', name: '后台管理', component: adminIndex,
      children: [
        {
          path: '/admin/articleGroup',
          component: adminArticleGroup,
          meta: [
            {name:'文章组管理',path:'/admin/articleGroup'},
          ],
        },
        {
          path: '/admin/article',
          component: adminArticle,
          meta: [
            {name:'文章管理',path:'/admin/article'},
          ],
        },
        {
          path: '/admin/activeSections',
          component: adminArticleSections,
          meta: [
            {name:'文章章节管理',path:'/admin/activeSections'},
          ],
        },
        {
          path: '/admin/oauthUrls',
          component: adminOauthUrls,
          meta: [
            {name:'授权地址',path:'/admin/oauthUrls'},
          ],
        },

      ]
    },


    {path: '/', name: '登录', component: adminLogin},
  ]
})
